#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <LengthUnit.h>

USING_MOCKCPP_NS USING_TESTNGPP_NS

FIXTURE(LengthUnit_convertToBaseUnit)
{
    TEST("YARD.convertToBaseLengthUnit(5)== 15*12")
    {
        ASSERT_EQ(YARD.convertToBaseUnit(5),15*12);
    }

    TEST("FEET.convertToBaseLengthUnit(3)==3*12")
    {
        ASSERT_EQ(FEET.convertToBaseUnit(3),3*12);
    }

    TEST("MILE.convertToBaseLengthUnit(1)==1760*3")
    {
        ASSERT_EQ(MILE.convertToBaseUnit(1),1760*3*12);
    }
};

FIXTURE(LengthUnit_Less)
{
    TEST("FEET<YARD")
    {
        ASSERT_TRUE(YARD>FEET);
    }

    TEST("YARD<MILE")
    {
        ASSERT_TRUE(MILE>YARD);
    }

};

FIXTURE(LengthUnit_Trace)
{
    TEST("5FEET / 1 YARD = 1 YARD")
    {
        ASSERT_EQ(1,YARD.convertFromBaseUnit(60));
    }
    TEST("5 FEET % 1 YARD = 2 FEET ")
    {
        ASSERT_EQ(2*12,YARD.convertOddmentFromBaseUnit(5*12));
    }
};

